<!--
* @Authoer: weimei
* @Description: 菜单配置
* @Date 2017/12/10 9：30
* @Modified By:
-->
<div id="menuConfig" class="yu-menu-config">
	<yu-panel :title="$t('menuConfig.cdpz')">
		<el-row :gutter="20">
			<el-col :span="6">
				<yu-toolBar>
					<h3 style="margin-bottom: 10px;">{{ $t('menuConfig.cds') }}</h2>
						<el-button class="btn" @click="createFn" v-if="createCheck">{{ $t('menuConfig.xz') }}</el-button>
						<el-button class="btn" @click="deleteFn" v-if="deleteCheck">{{ $t('menuConfig.sc') }}</el-button>
				</yu-toolBar>
				<yufp-ext-tree ref="menuTree" :show-checkbox="false" :height="height" :data-url="menuTreeUrl" data-id="menuId" node-key="menuId"
				 data-label="menuName" @node-click="nodeClickFn" :data-params="dataParams" data-pid="upMenuId" data-root="0" :expand-level='2'
				 :highlight-current="true" :root-visible="false" lazy>
				</yufp-ext-tree>
			</el-col>
			<el-col :span="7">
				<h3 class="yu-formTitle" style="margin-bottom: 10px;">{{ $t('menuConfig.zjdwh') }}</h3>
				<el-form-x ref="menuForm" :group-fields="menuFields" :buttons="formButtons" label-width="80px"></el-form-x>
			</el-col>
			<el-col :span="11">
				<el-collapse v-model="expandCollapseName" accordion>
					<el-collapse-item :title="$t('menuConfig.ywgnlb')" name="funcList">
						<yu-xform v-model="funcFormdata" related-table-name="funcTable" form-type="search" label-width="80px">
							<yu-xform-group :column="2">
								<yu-xform-item :label="$t('menuConfig.gjz')" :placeholder="$t('menuConfig.gjz')" ctype="input" name="queryKey"></yu-xform-item>
							</yu-xform-group>
						</yu-xform>
						<el-table-x ref="funcTable" :checkbox="false" :height="height - 185" :data-url="funcUrl" :table-columns="tableColumns" @row-click="funcSelect"></el-table-x>
					</el-collapse-item>
					<el-collapse-item :title="$t('menuConfig.sccd')" name="upMenu">
						<yufp-ext-tree ref="upMenuTree" :show-checkbox="false" :height="height - 130" :highlight-current="true" :data-url="menuTreeUrl"
						 data-id="menuId" data-label="menuName" @node-click="upMenuClickFn" :data-params="dataParams" data-pid="upMenuId" :data-root="menuRoot"
						 :expand-level='2' :filter-node-method="filterFn" lazy :root-visible="false">
						</yufp-ext-tree>
					</el-collapse-item>
				</el-collapse>
			</el-col>
		</el-row>
	</yu-panel>
	<el-dialog-x :center="true" :title="$t('menuConfig.tbxz')" :visible.sync="iconDialogVisible" height="400px">
		<div class="yu-icons">
			<a v-for="icons in icons" href="javascript:void(0)" :class="icons" :title="icons" @click="iconSelect"></a>
		</div>
	</el-dialog-x>
</div>
<style>
	.yu-menu-config .el-form-x-footer{
		padding-left: 90px;
	}
</style>